#import <Foundation/Foundation.h>
#import <EventKit/EKEvent.h>

#import "framework/FWListViewDelegate.h"

#import "PIEventStatus.h"
#import "PIAlarm.h"

@class FWApplication;
@class FWDetailListView;


@interface PIEventListAccessRange : NSObject
{
    NSInteger start;
    NSInteger duration;
    UIColor* color;
}

@property (assign) NSInteger start;
@property (assign) NSInteger duration;
@property (retain) UIColor* color;


+ (PIEventListAccessRange*)accessRangeWithStart:(NSInteger)start duration:(NSInteger)duration color:(UIColor*)color;
+ (PIEventListAccessRange*)allDayAccessRange:(UIColor*)color;

- (BOOL)isAllDay;

@end


@interface PIEventListAccess : NSObject <FWListViewDelegate>

@property (nonatomic, retain) NSMutableArray* additionalAlarms;


- (FWDetailListView*)previewWithFrame:(CGRect)rect atIndex:(NSInteger)index forItems:(NSArray*)list application:(FWApplication*)app;
- (void)scheduleExtraAlarmForId:(NSString*)key atDate:(NSDate*)date type:(kPIEventAlarmType)type;

@end
